import * as _0x2e23ba from 'd3-geo'
const _0xbfdd = ['enableDamping', 'width', 'rotation', '2TaztdF', 'position', 'directionalLight', 'setLights', 'update', 'oContainer', 'lookAt', 'setCamera', 'height', 'CSS2DRenderer', '413283owkhhq', 'setResize', 'render', 'setControls', 'maxPolarAngle', 'geoMercator', '262230swalMf', 'AxesHelper', 'left', '2878351LexHyz', 'appendChild', 'domElement', 'projection', 'PerspectiveCamera', 'controls', 'setHelper', 'center', '517544XLdPcq', 'renderer', '1IUTGyC', 'absolute', 'add', 'DirectionalLightHelper', 'translate', 'updateProjectionMatrix', 'querySelector', 'top', 'animate', 'labelRenderer', 'createCSS2DRenderer', 'THREE', 'GridHelper', '1411691QcyGgR', 'pointerEvents', 'camera', '434365AZTuLG', '.police-resource-distribution-content', 'init', 'setSize', 'set', '277575CjIFuu', 'scene', 'style', '1zaHcNj', 'addEventListener', 'Scene', 'DirectionalLight', 'none']
const _0x3d6925 = _0x29c5;
(function (_0x5281f2, _0x36006d) {
  const _0x11766a = _0x29c5
  while ([]) {
    try {
      const _0x46df66 = parseInt(_0x11766a(0x166)) + parseInt(_0x11766a(0x149)) + parseInt(_0x11766a(0x16c)) + -parseInt(_0x11766a(0x154)) * -parseInt(_0x11766a(0x151)) + parseInt(_0x11766a(0x15c)) * parseInt(_0x11766a(0x177)) + parseInt(_0x11766a(0x14c)) + -parseInt(_0x11766a(0x16f)) * parseInt(_0x11766a(0x179))
      if (_0x46df66 === _0x36006d) break
      else _0x5281f2.push(_0x5281f2.shift())
    } catch (_0x1e0cd1) {
      _0x5281f2.push(_0x5281f2.shift())
    }
  }
}(_0xbfdd, 0xe95e9))

function _0x29c5(_0x34fb93, _0x5a3a8b) {
  return _0x29c5 = function (_0xbfdd55, _0x29c5d6) {
    _0xbfdd55 = _0xbfdd55 - 0x145
    const _0x380658 = _0xbfdd[_0xbfdd55]
    return _0x380658
  }, _0x29c5(_0x34fb93, _0x5a3a8b)
}
const THREE = window[_0x3d6925(0x147)]
class ThreejsBasicMap {
  constructor() {
    const _0x586e71 = _0x3d6925
    this[_0x586e71(0x152)] = '', this[_0x586e71(0x14b)] = '', this[_0x586e71(0x178)] = '', this[_0x586e71(0x174)] = '', this[_0x586e71(0x161)] = document[_0x586e71(0x17f)](_0x586e71(0x14d)), this[_0x586e71(0x15a)] = parseFloat(getComputedStyle(this[_0x586e71(0x161)])[_0x586e71(0x15a)]), this.height = parseFloat(getComputedStyle(this.oContainer)[_0x586e71(0x164)]), this[_0x586e71(0x14e)]()
  }

  ['init']() {
    const _0x4d3983 = _0x3d6925
    this[_0x4d3983(0x152)] = new THREE[(_0x4d3983(0x156))](), this[_0x4d3983(0x14b)] = new THREE[(_0x4d3983(0x173))](0x4b, this.width / this[_0x4d3983(0x164)], 0.1, 0x3e8), this[_0x4d3983(0x163)]({
      x: 21.357067340997116,
      y: -0.9952385048934147,
      z: 59.8912156741751
    }), this.renderer = new THREE.WebGLRenderer({
      antialias: !![],
      alpha: !![]
    }), this[_0x4d3983(0x178)][_0x4d3983(0x14f)](this[_0x4d3983(0x15a)], this.height), this.oContainer.appendChild(this.renderer[_0x4d3983(0x171)]), this[_0x4d3983(0x169)](), this[_0x4d3983(0x15f)](), this.setResize(), this.createCSS2DRenderer(), this[_0x4d3983(0x181)]()
  }

  ['setCamera']({
    x: _0x2eb082,
    y: _0x1655e8,
    z: _0x1c15fb
  }) {
    const _0x3d9616 = _0x3d6925
    this[_0x3d9616(0x14b)].up.x = 0x0, this[_0x3d9616(0x14b)].up.y = 0x0, this[_0x3d9616(0x14b)].up.z = 0x1, this[_0x3d9616(0x14b)].position[_0x3d9616(0x150)](_0x2eb082, _0x1655e8, _0x1c15fb), this[_0x3d9616(0x14b)][_0x3d9616(0x162)](0x0, 0x0, 0x0)
  }

  [_0x3d6925(0x169)]() {
    const _0x1442d2 = _0x3d6925
    this.controls = new THREE.OrbitControls(this[_0x1442d2(0x14b)], this[_0x1442d2(0x178)][_0x1442d2(0x171)]), this[_0x1442d2(0x174)][_0x1442d2(0x159)] = !![], this[_0x1442d2(0x174)].dampingFactor = 0.05, this[_0x1442d2(0x174)].screenSpacePanning = ![], this[_0x1442d2(0x174)][_0x1442d2(0x16a)] = Math.PI / 0x2, this[_0x1442d2(0x174)][_0x1442d2(0x160)]()
  }

  ['setLights']() {
    const _0x1fbd06 = _0x3d6925
    const _0x1da877 = new THREE.AmbientLight(0xbbbbbb)
    this.scene.add(_0x1da877), this[_0x1fbd06(0x15e)] = new THREE[(_0x1fbd06(0x157))](0x444444), this[_0x1fbd06(0x15e)][_0x1fbd06(0x15d)][_0x1fbd06(0x150)](-0xa, 0x14, 0x28), this[_0x1fbd06(0x152)][_0x1fbd06(0x17b)](this.directionalLight)
  }

  [_0x3d6925(0x175)]() {
    const _0x10ceff = _0x3d6925
    const _0x176530 = new THREE[(_0x10ceff(0x16d))](0x14)
    this[_0x10ceff(0x152)].add(_0x176530)
    const _0x4d95db = new THREE[(_0x10ceff(0x17c))](this[_0x10ceff(0x15e)], 0x5)
    this[_0x10ceff(0x152)][_0x10ceff(0x17b)](_0x4d95db)
    const _0x3e880d = new THREE[(_0x10ceff(0x148))](0x64, 0x32)
    _0x3e880d[_0x10ceff(0x15b)].x = -Math.PI * 0.5, this[_0x10ceff(0x152)][_0x10ceff(0x17b)](_0x3e880d)
  }

  [_0x3d6925(0x167)]() {
    const _0x4a155b = _0x3d6925
    window[_0x4a155b(0x155)]('resize', () => {
      const _0x38522a = _0x4a155b
      this[_0x38522a(0x15a)] = parseFloat(getComputedStyle(this[_0x38522a(0x161)]).width), this.height = parseFloat(getComputedStyle(this[_0x38522a(0x161)])[_0x38522a(0x164)]), this[_0x38522a(0x178)][_0x38522a(0x14f)](this[_0x38522a(0x15a)], this[_0x38522a(0x164)]), this[_0x38522a(0x145)].setSize(this[_0x38522a(0x15a)], this[_0x38522a(0x164)]), this[_0x38522a(0x145)][_0x38522a(0x168)](this[_0x38522a(0x152)], this[_0x38522a(0x14b)]), this[_0x38522a(0x14b)].aspect = this[_0x38522a(0x15a)] / this[_0x38522a(0x164)], this[_0x38522a(0x14b)][_0x38522a(0x17e)]()
    })
  }

  [_0x3d6925(0x146)]() {
    const _0x1bb4bb = _0x3d6925
    this[_0x1bb4bb(0x145)] = new THREE[(_0x1bb4bb(0x165))](), this[_0x1bb4bb(0x145)][_0x1bb4bb(0x14f)](this[_0x1bb4bb(0x15a)], this.height), this[_0x1bb4bb(0x145)].domElement[_0x1bb4bb(0x153)][_0x1bb4bb(0x15d)] = _0x1bb4bb(0x17a), this[_0x1bb4bb(0x145)][_0x1bb4bb(0x171)][_0x1bb4bb(0x153)][_0x1bb4bb(0x180)] = '0', this.labelRenderer[_0x1bb4bb(0x171)][_0x1bb4bb(0x153)][_0x1bb4bb(0x16e)] = '0', this[_0x1bb4bb(0x145)][_0x1bb4bb(0x171)].style[_0x1bb4bb(0x14a)] = _0x1bb4bb(0x158), this[_0x1bb4bb(0x161)][_0x1bb4bb(0x170)](this.labelRenderer[_0x1bb4bb(0x171)])
  }

  [_0x3d6925(0x181)]() {
    const _0x1d5d5e = _0x3d6925
    requestAnimationFrame(this[_0x1d5d5e(0x181)].bind(this)), this[_0x1d5d5e(0x174)][_0x1d5d5e(0x160)](), this.renderer.render(this[_0x1d5d5e(0x152)], this[_0x1d5d5e(0x14b)]), this.labelRenderer[_0x1d5d5e(0x168)](this[_0x1d5d5e(0x152)], this[_0x1d5d5e(0x14b)])
  }

  ['lnglatToMector'](_0x234a61) {
    const _0x3864fd = _0x3d6925
    !this[_0x3864fd(0x172)] && (this.projection = _0x2e23ba[_0x3864fd(0x16b)]()[_0x3864fd(0x176)]([108.378558, 22.868686]).scale(0xbb8).rotate(Math.PI / 0x4)[_0x3864fd(0x17d)]([0x0, 0x0]))
    const [_0x33e37c, _0x4ea2fc] = this[_0x3864fd(0x172)]([..._0x234a61]); const _0x438958 = 0x0
    return [_0x4ea2fc, _0x33e37c, _0x438958]
  }
}
export default ThreejsBasicMap
